home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Utilities
/
Converters
/
Convert_PICT
/
Source
/
UncommentedPSCode
/
Polygons
< prev
next >
Wrap
Text File
|
1995-06-12
|
1KB
|
103 lines
%BEGIN Polygons
/polyPath
{
/right exch def
/bottom exch def
/left exch def
/top exch def
/points exch def
newpath
left top moveto
right top lineto
right bottom lineto
left bottom lineto
closepath
clip
newpath
/ptarray exch def
ptarray 0 get
ptarray 1 get
moveto
points 1 sub
{
/ptarray exch def
ptarray 0 get
ptarray 1 get
lineto
}
repeat % for (points-1) times
} def
/framePoly
{
/right exch def
/bottom exch def
/left exch def
/top exch def
/points exch def
gsave
penPattern usePattern
/ptarray exch def
/lastX ptarray 0 get def
/lastY ptarray 1 get def
points 1 sub
{
/ptarray exch def
lastX lastY
/lastX ptarray 0 get def
/lastY ptarray 1 get def
lastX lastY PICTline
}
repeat % for (points-1) times
grestore
}
def
/paintPoly
{
gsave
penPattern usePattern
polyPath
fill
grestore
}
def
/erasePoly
{
gsave
backPattern usePattern
polyPath
fill
grestore
}
def
/invertPoly
{
gsave
polyPath
grestore
}
def
/fillPoly
{
gsave
fillPattern usePattern
polyPath
fill
grestore
} def
/frameSamePoly
{ }
def
/paintSamePoly
{ }
def
/eraseSamePoly
{ }
def
/invertSamePoly
{ }
def
/fillSamePoly
{ }
def
%END Polygons